import request from '@/utils/request'

export function getRole(data) {
  return request({
    url: '/role/findAll',
    method: 'post',
    data
  })
}

export function deleteRole(data) {
  return request({
    url: '/role/deleteById/'+data,
    method: 'post',
  })
}

export function getPerm() {
  return request({
    url: '/perm/findAll',
    method: 'get',
  })
}

export function updateRole(data) {
  return request({
    url: '/role/updateRole',
    method: 'post',
    data
  })
}

export function addRole(data) {
  return request({
    url: '/role/addRole',
    method: 'post',
    data
  })
}